package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.dto.DishDTO;
import com.sky.dto.DishPageQueryDTO;
import com.sky.entity.Dish;
import com.sky.vo.DishVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * PROJECT_NAME: sky-take-out
 * NAME: DishMapper
 *
 * @AUTHOR: zhang
 * DATE: 2023/11/23
 * DESCRIPTION :
 */
@Mapper
public interface DishMapper {
     Page<DishVO> getPage(@Param("dto") DishPageQueryDTO dto) ;

    void insertDish(@Param("dish") Dish dish);

    DishVO selectDishById(@Param("id") Long id);

    void updateDish(@Param("dishDTO") DishDTO dishDTO);

    void deleteBatch(@Param("ids") List<Long> ids);

    List<Dish> selectDishByCategoryId(@Param("categoryId") Long categoryId);
}
